Skip to content

feat: add live tempo control#27

Merged
britle20 merged 1 commit into
developfrom
feat/25-tempo-control
Jun 7, 2026
Merged

feat: add live tempo control#27
britle20 merged 1 commit into
developfrom
feat/25-tempo-control

Conversation

@britle20

@britle20 britle20 commented Jun 7, 2026

Copy link
Copy Markdown
Collaborator

Summary

Closes #25

Makes the BPM slider control the actual transport tempo used by clip playback scheduling. Tempo changes now update audio-engine transport state, and active playback uses the new tempo for future lookahead scheduler windows.

Changes

  • Adds shared tempo constants and clampTempoBpm for the 60-180 BPM transport range.
  • Wires the app BPM slider to audioEngine.setTempoBpm instead of only updating local display state.
  • Adds a mutable scheduler tempo update path that preserves the current runtime tick while playback is active.
  • Passes scheduler tempo through scheduled events so pitched note durations use the tempo active for that scheduling window.
  • Keeps stopped and paused tempo changes available for the next play/resume action.
  • Marks the tempo feature spec as in review and notes Tempo control and live BPM updates #25 in PLANS.md.
  • Adds unit tests for tempo clamping and live scheduler tempo updates.

Testing

  • npm run typecheck --if-present
  • npm run lint --if-present
  • npm run test --if-present
  • npm run build --if-present

Screenshots

Not included. Dev server was started and the app returned HTTP 200 at http://127.0.0.1:5174/ because port 5173 was already in use.

Notes / Limitations

  • Tempo changes affect future scheduler windows. Events already submitted to Web Audio inside the current short lookahead window may still use the previous tempo briefly.
  • No tempo automation, tap tempo, metronome, or arrangement tempo map is included.
  • Manual audible tempo-change review still needs browser playback.

@britle20 britle20 merged commit 78aa5fc into develop Jun 7, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant